package xyz.blushyes.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import xyz.blushyes.service.CacheTestService;

@RestController
@RequiredArgsConstructor
public class SimpleCacheController {

    private final CacheTestService cacheTestService;

    @GetMapping("/notCache")
    public String notCache(@RequestParam Integer number) {
        return "The id is: " + cacheTestService.notCache(number);
    }

    @GetMapping("/simpleCache")
    public String simpleCache(@RequestParam Integer number) {
        return "The id is: " + cacheTestService.simpleCache(number);
    }

}
